Demo of error bars from Fabio on bokeh mailing list


In [3]:
import numpy as np

from bokeh.plotting import figure, show, output_notebook

output_notebook()


BokehJS successfully loaded.

In [4]:
x = np.linspace(0, 4*np.pi, 200)
y = np.sin(x)
upperband = y + y*0.1
lowerband = y - y*0.1

band_x = np.append(x, x[::-1])
band_y = np.append(lowerband, upperband[::-1])

p = figure(title="sin with error bar")
p.line(x,y, color="#2222aa", line_width=2)
p.patch(band_x, band_y, color='#7570B3', fill_alpha=0.2)
p.ygrid[0].ticker.desired_num_ticks = 20

show(p)



In [ ]: